﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ComponentFactory.Krypton.Toolkit;
using System.Drawing;

namespace LED_Utils.MultitrackControl
{
    public class ColoredKryptonCheckButton : KryptonCheckButton
    {
        public Color _color;

        public Color Color
        {
            get
            {
                return _color;
            }
            set
            {
                _color = value;
                AssignImage();
            }
        }

        private void AssignImage()
        {
            Bitmap bmp = new Bitmap(32, 32);
            Graphics graphics = Graphics.FromImage(bmp);

            graphics.FillRectangle(new SolidBrush(Color), 0, 0, bmp.Width, bmp.Height);
            graphics.Flush();
            //this.StateCommon.Back.Image = bmp;
            //this.StateCommon.Back.ImageStyle = PaletteImageStyle.CenterLeft;
            //this.StateCheckedNormal.Back.Image = bmp;
            //this.StateCheckedNormal.Back.ImageStyle = PaletteImageStyle.CenterLeft ;
            //this.StateCheckedTracking.Back.Image = bmp;
            //this.StateCheckedTracking.Back.ImageStyle = PaletteImageStyle.CenterLeft;
            //this.StateTracking.Back.Image = bmp;
            //this.StateTracking.Back.ImageStyle = PaletteImageStyle.CenterLeft;
            this.Values.Image = bmp;


   
  
        }
    }
}

